/*
Copyright 2023 Sangfor Technologies Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package restapi

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"encoding/json"
)

var (
	// SwaggerJSON embedded version of the swagger document used at generation time
	SwaggerJSON json.RawMessage
	// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
	FlatSwaggerJSON json.RawMessage
)

func init() {
	SwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "schemes": [
    "http"
  ],
  "swagger": "2.0",
  "info": {
    "description": "chaosArsenal fault injection module API specification",
    "title": "chaosArsenal fault injection",
    "contact": {
      "name": "chaos-arsenal",
      "url": "https://www.sangfor.com.cn/",
      "email": "chaos-arsenal@sangfor.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0.0"
  },
  "basePath": "/arsenal/v1",
  "paths": {
    "/faults": {
      "get": {
        "description": "Listing faults injected.",
        "parameters": [
          {
            "maxLength": 16,
            "minLength": 16,
            "pattern": "^[a-f0-9]*$",
            "type": "string",
            "description": "The id generated during fault injected.",
            "name": "id",
            "in": "query"
          },
          {
            "maxLength": 64,
            "minLength": 2,
            "type": "string",
            "description": "Fault domain for a fault.",
            "name": "domain",
            "in": "query"
          },
          {
            "maxLength": 128,
            "minLength": 2,
            "pattern": "^[a-z0-9-]*$",
            "type": "string",
            "description": "The type of the injected fault.",
            "name": "fault-type",
            "in": "query"
          },
          {
            "enum": [
              "injected",
              "removed",
              "succeeded"
            ],
            "type": "string",
            "description": "The status of injected fault.",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date-time",
            "description": "The start time of fault injection.",
            "name": "inject-time",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date-time",
            "description": "The start time of fault injection.",
            "name": "update-time",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/Infos200Response"
          },
          "404": {
            "$ref": "#/responses/Error404Response"
          },
          "500": {
            "$ref": "#/responses/Error500Response"
          }
        }
      },
      "post": {
        "description": "Inject a fault.",
        "parameters": [
          {
            "description": "Details about the fault to inject.",
            "name": "info",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FaultCreate"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/200Response"
          },
          "400": {
            "$ref": "#/responses/Error400Response"
          },
          "500": {
            "$ref": "#/responses/Error500Response"
          }
        }
      }
    },
    "/faults/{id}": {
      "delete": {
        "description": "Delete the specific fault.",
        "responses": {
          "200": {
            "$ref": "#/responses/Infos200Response"
          },
          "404": {
            "$ref": "#/responses/Error404Response"
          },
          "500": {
            "$ref": "#/responses/Error500Response"
          }
        }
      },
      "parameters": [
        {
          "maxLength": 16,
          "minLength": 16,
          "pattern": "^[a-f0-9]*$",
          "type": "string",
          "description": "The id generated during fault injected.",
          "name": "id",
          "in": "path",
          "required": true
        }
      ]
    }
  },
  "definitions": {
    "200Response": {
      "description": "Response successfully",
      "type": "object",
      "required": [
        "code",
        "id",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "id": {
          "$ref": "#/definitions/Id"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "Code": {
      "description": "Response status code",
      "type": "integer",
      "format": "int64"
    },
    "Error400Response": {
      "description": "Bad Request",
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "Error404Response": {
      "description": "Not Found",
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "Error500Response": {
      "description": "Internal server error",
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "FaultCreate": {
      "description": "A fault to be injected.",
      "type": "object",
      "required": [
        "env",
        "domain",
        "fault-type"
      ],
      "properties": {
        "domain": {
          "description": "Fault domain for a fault.",
          "type": "string",
          "maxLength": 64,
          "minLength": 2
        },
        "env": {
          "description": "Fault inject running environment.",
          "type": "string",
          "maxLength": 64,
          "minLength": 2
        },
        "fault-type": {
          "description": "Fault type to inject",
          "type": "string",
          "maxLength": 128,
          "minLength": 2,
          "pattern": "^[a-z0-9-]*$"
        },
        "params": {
          "description": "Parameters for the fault, a collection of key-value pairs. Each fault type has a specific group of valid keys.\n",
          "type": "object",
          "default": {},
          "additionalProperties": {
            "description": "Value for the parameter, Can be an empty string.",
            "type": "string",
            "maxLength": 1024
          }
        },
        "timeout": {
          "description": "The inject fault auto remove time",
          "type": "string",
          "maxLength": 64,
          "minLength": 2,
          "pattern": "^(?:(\\d+d):)?(?:(\\d+h):)?(?:(\\d+m):)?(?:(\\d+s))?$"
        }
      }
    },
    "Id": {
      "description": "The id generated during fault injected",
      "type": "string"
    },
    "Infos200Response": {
      "description": "Query operation request successfully",
      "required": [
        "code",
        "infos"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "infos": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "$ref": "#/definitions/OpsInfo"
          }
        }
      }
    },
    "Message": {
      "description": "Response descriptions",
      "type": "string",
      "format": "freetext",
      "maxLength": 4096
    },
    "OpsInfo": {
      "type": "object",
      "properties": {
        "domain": {
          "description": "The domain to which the fault belongs",
          "type": "string"
        },
        "faultType": {
          "description": "The fault type",
          "type": "string"
        },
        "flags": {
          "description": "A string concatenated from the parameters obtained from the HTTP request",
          "type": "string"
        },
        "injectTime": {
          "description": "The time at which the fault was injected",
          "type": "string",
          "format": "date-time"
        },
        "private": {
          "description": "The fault type private data",
          "type": "string"
        },
        "proactiveCleanup": {
          "description": "Used to describe whether a fault requires proactive cleanup",
          "type": "boolean"
        },
        "status": {
          "description": "Describes the status of the fault",
          "type": "string"
        },
        "updateTime": {
          "description": "The fault corresponds to the modification time of the database table entry",
          "type": "string",
          "format": "date-time"
        },
        "uuid": {
          "description": "The UUID generated during fault injected",
          "type": "string"
        }
      }
    }
  },
  "responses": {
    "200Response": {
      "description": "Response successfully",
      "schema": {
        "$ref": "#/definitions/200Response"
      }
    },
    "Error400Response": {
      "description": "Input fault injection object error",
      "schema": {
        "$ref": "#/definitions/Error400Response"
      }
    },
    "Error404Response": {
      "description": "No fault's information found",
      "schema": {
        "$ref": "#/definitions/Error404Response"
      }
    },
    "Error500Response": {
      "description": "Server error while processing the request",
      "schema": {
        "$ref": "#/definitions/Error500Response"
      }
    },
    "Infos200Response": {
      "description": "Response successfully",
      "schema": {
        "$ref": "#/definitions/Infos200Response"
      }
    }
  }
}`))
	FlatSwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "schemes": [
    "http"
  ],
  "swagger": "2.0",
  "info": {
    "description": "chaosArsenal fault injection module API specification",
    "title": "chaosArsenal fault injection",
    "contact": {
      "name": "chaos-arsenal",
      "url": "https://www.sangfor.com.cn/",
      "email": "chaos-arsenal@sangfor.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0.0"
  },
  "basePath": "/arsenal/v1",
  "paths": {
    "/faults": {
      "get": {
        "description": "Listing faults injected.",
        "parameters": [
          {
            "maxLength": 16,
            "minLength": 16,
            "pattern": "^[a-f0-9]*$",
            "type": "string",
            "description": "The id generated during fault injected.",
            "name": "id",
            "in": "query"
          },
          {
            "maxLength": 64,
            "minLength": 2,
            "type": "string",
            "description": "Fault domain for a fault.",
            "name": "domain",
            "in": "query"
          },
          {
            "maxLength": 128,
            "minLength": 2,
            "pattern": "^[a-z0-9-]*$",
            "type": "string",
            "description": "The type of the injected fault.",
            "name": "fault-type",
            "in": "query"
          },
          {
            "enum": [
              "injected",
              "removed",
              "succeeded"
            ],
            "type": "string",
            "description": "The status of injected fault.",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date-time",
            "description": "The start time of fault injection.",
            "name": "inject-time",
            "in": "query"
          },
          {
            "type": "string",
            "format": "date-time",
            "description": "The start time of fault injection.",
            "name": "update-time",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Response successfully",
            "schema": {
              "$ref": "#/definitions/Infos200Response"
            }
          },
          "404": {
            "description": "No fault's information found",
            "schema": {
              "$ref": "#/definitions/Error404Response"
            }
          },
          "500": {
            "description": "Server error while processing the request",
            "schema": {
              "$ref": "#/definitions/Error500Response"
            }
          }
        }
      },
      "post": {
        "description": "Inject a fault.",
        "parameters": [
          {
            "description": "Details about the fault to inject.",
            "name": "info",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FaultCreate"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response successfully",
            "schema": {
              "$ref": "#/definitions/200Response"
            }
          },
          "400": {
            "description": "Input fault injection object error",
            "schema": {
              "$ref": "#/definitions/Error400Response"
            }
          },
          "500": {
            "description": "Server error while processing the request",
            "schema": {
              "$ref": "#/definitions/Error500Response"
            }
          }
        }
      }
    },
    "/faults/{id}": {
      "delete": {
        "description": "Delete the specific fault.",
        "responses": {
          "200": {
            "description": "Response successfully",
            "schema": {
              "$ref": "#/definitions/Infos200Response"
            }
          },
          "404": {
            "description": "No fault's information found",
            "schema": {
              "$ref": "#/definitions/Error404Response"
            }
          },
          "500": {
            "description": "Server error while processing the request",
            "schema": {
              "$ref": "#/definitions/Error500Response"
            }
          }
        }
      },
      "parameters": [
        {
          "maxLength": 16,
          "minLength": 16,
          "pattern": "^[a-f0-9]*$",
          "type": "string",
          "description": "The id generated during fault injected.",
          "name": "id",
          "in": "path",
          "required": true
        }
      ]
    }
  },
  "definitions": {
    "200Response": {
      "description": "Response successfully",
      "type": "object",
      "required": [
        "code",
        "id",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "id": {
          "$ref": "#/definitions/Id"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "Code": {
      "description": "Response status code",
      "type": "integer",
      "format": "int64"
    },
    "Error400Response": {
      "description": "Bad Request",
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "Error404Response": {
      "description": "Not Found",
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "Error500Response": {
      "description": "Internal server error",
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "message": {
          "$ref": "#/definitions/Message"
        }
      }
    },
    "FaultCreate": {
      "description": "A fault to be injected.",
      "type": "object",
      "required": [
        "env",
        "domain",
        "fault-type"
      ],
      "properties": {
        "domain": {
          "description": "Fault domain for a fault.",
          "type": "string",
          "maxLength": 64,
          "minLength": 2
        },
        "env": {
          "description": "Fault inject running environment.",
          "type": "string",
          "maxLength": 64,
          "minLength": 2
        },
        "fault-type": {
          "description": "Fault type to inject",
          "type": "string",
          "maxLength": 128,
          "minLength": 2,
          "pattern": "^[a-z0-9-]*$"
        },
        "params": {
          "description": "Parameters for the fault, a collection of key-value pairs. Each fault type has a specific group of valid keys.\n",
          "type": "object",
          "default": {},
          "additionalProperties": {
            "description": "Value for the parameter, Can be an empty string.",
            "type": "string",
            "maxLength": 1024,
            "minLength": 0
          }
        },
        "timeout": {
          "description": "The inject fault auto remove time",
          "type": "string",
          "maxLength": 64,
          "minLength": 2,
          "pattern": "^(?:(\\d+d):)?(?:(\\d+h):)?(?:(\\d+m):)?(?:(\\d+s))?$"
        }
      }
    },
    "Id": {
      "description": "The id generated during fault injected",
      "type": "string"
    },
    "Infos200Response": {
      "description": "Query operation request successfully",
      "required": [
        "code",
        "infos"
      ],
      "properties": {
        "code": {
          "$ref": "#/definitions/Code"
        },
        "infos": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/definitions/OpsInfo"
          }
        }
      }
    },
    "Message": {
      "description": "Response descriptions",
      "type": "string",
      "format": "freetext",
      "maxLength": 4096,
      "minLength": 0
    },
    "OpsInfo": {
      "type": "object",
      "properties": {
        "domain": {
          "description": "The domain to which the fault belongs",
          "type": "string"
        },
        "faultType": {
          "description": "The fault type",
          "type": "string"
        },
        "flags": {
          "description": "A string concatenated from the parameters obtained from the HTTP request",
          "type": "string"
        },
        "injectTime": {
          "description": "The time at which the fault was injected",
          "type": "string",
          "format": "date-time"
        },
        "private": {
          "description": "The fault type private data",
          "type": "string"
        },
        "proactiveCleanup": {
          "description": "Used to describe whether a fault requires proactive cleanup",
          "type": "boolean"
        },
        "status": {
          "description": "Describes the status of the fault",
          "type": "string"
        },
        "updateTime": {
          "description": "The fault corresponds to the modification time of the database table entry",
          "type": "string",
          "format": "date-time"
        },
        "uuid": {
          "description": "The UUID generated during fault injected",
          "type": "string"
        }
      }
    }
  },
  "responses": {
    "200Response": {
      "description": "Response successfully",
      "schema": {
        "$ref": "#/definitions/200Response"
      }
    },
    "Error400Response": {
      "description": "Input fault injection object error",
      "schema": {
        "$ref": "#/definitions/Error400Response"
      }
    },
    "Error404Response": {
      "description": "No fault's information found",
      "schema": {
        "$ref": "#/definitions/Error404Response"
      }
    },
    "Error500Response": {
      "description": "Server error while processing the request",
      "schema": {
        "$ref": "#/definitions/Error500Response"
      }
    },
    "Infos200Response": {
      "description": "Response successfully",
      "schema": {
        "$ref": "#/definitions/Infos200Response"
      }
    }
  }
}`))
}
